package cn.hadron.ssh.action.admin;
import cn.hadron.ssh.service.ArticleService;
import cn.hadron.ssh.util.Pager;
import cn.hadron.ssh.bean.Article;
import com.opensymphony.xwork2.ActionSupport;
public class ArticleList extends ActionSupport {
	private int id;   //页号
	private int cid;  //栏目号 
	private Pager<Article> pager ;
	private ArticleService as;
	public String pager() throws Exception {
		System.out.println("ArticleService="+as);
		pager=as.getPager(id, 5);
		pager.setUrl("list");
		return SUCCESS;
	}	
	public String pagerByChannel() throws Exception {
		pager=as.getPager(cid, id, 6);
		pager.setUrl("list");
		return SUCCESS;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}

	public Pager<Article> getPager() {
		return pager;
	}
	public void setPager(Pager<Article> pager) {
		this.pager = pager;
	}
	public int getCid() {
		return cid;
	}
	public void setCid(int cid) {
		this.cid = cid;
	}
	public ArticleService getAs() {
		return as;
	}
	public void setAs(ArticleService as) {
		this.as = as;
	}
}
